<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" dir="ltr">
<head>
	#headTag('短消息_会员中心')
</head>
<body>
<div id="page">
#parse("default/_header.htm")
<div id="middle">
<div id="main_wrap">
	<div id="main">
		#topbar()
		<div class="center">
			<h1>短消息</h1>
			<div class="content" style="margin-top:0px;">			
				<div class="message_box">
					<div class="nav">
				    <ul>
						<li><a #if($type=='inbox')class="current"#end href="$url.base/member/$owner.id/message/inbox">收件箱</a></li>
		      			<li><a #if($type=='outbox')class="current"#end href="$url.base/member/$owner.id/message/outbox">发件箱</a></li>
				    </ul>
				    <div class="clear"></div>
					</div>
					<table class="message_list">
						<thead>
						<tr>
							<th width="40px">选择</th>
							<th>内容</th>
			    			#if($type=='outbox')
				    		<th width="120px">发送至</th>
				    		#elseif($type=='inbox')
				    		<th width="120px">来自</th>
				    		#end
							<th width="100px">时间</th>
						</tr>
						</thead>
						#foreach($message in $messageList)
						<tbody>
						<tr onmouseout="$(this).css('background','white')" onmouseover="$(this).css('background','#eee')">
							<td><input value="${message.id}" type="checkbox"/></td>
							<td>
								<a href="$url.base/message/${message.id}" #if(!$message.read)style="font-weight:bold;"#end>
								$utils.description($message.content,50)
								</a>
							</td>
							<td>
			    			<c:choose>
				    		#if($type=='outbox')
				    		<a href="$url.base/member/${message.receiver.id}/profile">${message.receiver.nickname}</a>
				    		#elseif($type=='inbox')
				    		<a href="$url.base/member/${message.sender.id}/profile">${message.sender.nickname}</a>
				    		#end
							</td>
							<td>$utils.dateFormat('yyyy-MM--dd',$message.sendTime)</td>
						</tr>
						</tbody>
						#end
					</table>
					#if($pagination.infoAmount>0)
						<div class="operation">
							<a onclick="$('input[type=checkbox]').attr('checked','checked')" href="#">全选</a>
							<a onclick="$('input[type=checkbox]').removeAttr('checked')" href="#">不选</a>
							<button onclick="forum.op.deleteMessage()">删除</button>
							<button onclick="forum.op.deleteAllInBox()">清空收件箱</button>
						</div>
						</c:when>
					#else
							<br/>
							没有消息可以查看
					#end
					#pagination($pagination)
				</div>
			</div>
		</div>
	</div>
</div>
#parse("default/center/_sidebar.htm")
</div>
</div>
#parse("default/_footer.htm")
</body>
</html>